<template>
  <div>
    <b>病害虫记录 </b>
    <hr />
  </div>
  <div>
    <div>
      <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
        <el-tab-pane label="害虫发生记录" name="first">
          <bugone />
        </el-tab-pane>
        <el-tab-pane label="害虫防治记录" name="second">
          <bugtwo />
        </el-tab-pane>
      </el-tabs>
    </div>
  </div>
</template>

<script setup lang="ts">
import type { TabsPaneContext } from 'element-plus'
import { ref } from 'vue'
import bugone from './bug_one.vue'
import bugtwo from './bug_two.vue'

const activeName = ref('first')
const handleClick = (tab: TabsPaneContext, event: Event) => {
  console.log(tab, event)
}
</script>

<style scoped></style>
